<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>前端JavaScript</title>
    <style>
        .menu{
            width: 300px;
            bolder:1px solid red;
        }
        .menu .header{
            background-color: #c1e2b3;
            padding:20px 40px;
        }
    </style>
</head>
<body>
    <div class="menu">
        <div class="header" onclick="fun()">点击弹窗</div>
        <div class="item">在这里面是内容</div>
    </div>

    <script type="text/javascript">
        function fun(){
            alert("恭喜你,弹窗成功")
            confirm("要继续吗？")
        }
    </script>
</body>
</html>